home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / modules / nessus-2.2.8.mo / usr / lib / nessus / plugins / phpbb_xss.nasl < prev    next >
Text File  |  2005-01-14  |  2KB  |  68 lines

  1. #
  2. # (C) Tenable Network Security
  3. #
  4.  
  5. if(description)
  6. {
  7.  script_id(12093);
  8.  script_bugtraq_id(9865, 9866);
  9.  
  10.  script_version("$Revision: 1.6 $");
  11.  name["english"] = "phpBB Cross-Site scripting vulnerabilities";
  12.  script_name(english:name["english"]);
  13.  
  14.  desc["english"] = "
  15. The remote host is running phpBB.
  16.  
  17. There is a cross site scripting vulnerability in the files ViewTopic.php
  18. and ViewForum.php
  19.  
  20. Solution : Upgrade to the latest version of this software
  21. Risk factor : High";
  22.  
  23.  
  24.  script_description(english:desc["english"]);
  25.  
  26.  summary["english"] = "XSS test";
  27.  
  28.  script_summary(english:summary["english"]);
  29.  
  30.  script_category(ACT_GATHER_INFO);
  31.  
  32.  script_copyright(english:"This script is Copyright (C) 2004 Tenable Network Security");
  33.  family["english"] = "CGI abuses";
  34.  script_family(english:family["english"]);
  35.  script_dependencie("phpbb_detect.nasl", "cross_site_scripting.nasl");
  36.  script_require_ports("Services/www", 80);
  37.  exit(0);
  38. }
  39.  
  40. # Check starts here
  41.  
  42. include("http_func.inc");
  43. include("http_keepalive.inc");
  44.  
  45.  
  46. port = get_http_port(default:80);
  47.  
  48. if(!get_port_state(port))exit(0);
  49.  
  50. if ( get_kb_item("www/"+port+"/generic_xss") ) exit(0);
  51.  
  52. kb = get_kb_item("www/" + port + "/phpBB");
  53. if ( ! kb ) exit(0);
  54. matches = eregmatch(pattern:"(.*) under (.*)", string:kb);
  55. dir = matches[1];
  56.  
  57.  
  58. req = http_get(item:dir + "/viewtopic.php?t=10&postdays=99<script>foo</script>", port:port);
  59. buf = http_keepalive_send_recv(port:port, data:req, bodyonly:1);
  60. if(buf == NULL)exit(0);
  61. req = http_get(item:dir + "/viewforum.php?f=10&postdays=99<script>foo</script>", port:port);
  62. buf2 = http_keepalive_send_recv(port:port, data:req, bodyonly:1);
  63. if(buf2 == NULL)exit(0);
  64.  
  65. if("<script>foo</script>" >< buf || "<script>foo</script>" >< buf2 )
  66.     security_warning(port);
  67.